import http from '../util/request.js';

export default {
    add: (obj) => http({
        url: '/order_detail',
        method: 'post',
        data: obj,
        headers: { 'Content-Type': 'application/json' }
    }),
    edit: (obj) => http({
        url: '/order_detail',
        method: 'put',
        data: obj,
        headers: { 'Content-Type': 'application/json' }
    }),
    del: (id) => http({
        url: `/order_detail/${id}`,
        method: 'delete'
    }),
    page: (params) => http({
        url: '/order_detail/page',
        method: 'get',
        params
    }),
    one: (id) => http({
        url: `/order_detail/${id}`,
        method: 'get'
    })
};
